import request from '@/utils/request'

// 查询班次列表==================
export function listSignCate(query) {
  return request({
    url: '/system/sign_category/list',
    method: 'get',
    params: query
  })
}

// 查询班次详细
export function getSignCate(postId) {
  return request({
    url: '/system/sign_category/' + postId,
    method: 'get'
  })
}

// 新增班次
export function addSignCate(data) {
  return request({
    url: '/system/sign_category',
    method: 'post',
    data: data
  })
}

// 修班次
export function updateSignCate(data) {
  return request({
    url: '/system/sign_category',
    method: 'put',
    data: data
  })
}

// 删除班次
export function delSignCate(postId) {
  return request({
    url: '/system/sign_category/' + postId,
    method: 'delete'
  })
}


// 排班列表==================
export function listScheduling(query) {
  return request({
    url: '/system/scheduling/list',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getScheduling(postId) {
  return request({
    url: '/system/scheduling/' + postId,
    method: 'get'
  })
}

// 新增排班
export function addScheduling(data) {
  return request({
    url: '/system/scheduling',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updateScheduling(data) {
  return request({
    url: '/system/scheduling',
    method: 'put',
    data: data
  })
}

// 删除排班
export function delScheduling(postId) {
  return request({
    url: '/system/scheduling/' + postId,
    method: 'delete'
  })
}

// 查询用户考勤组
export function attend_group_user(query) {
  return request({
    url: '/system/attend_group/user',
    method: 'get',
    params: query
  })
}

// 打卡考勤记录
export function signLog(query) {
  return request({
    url: '/system/sign/list',
    method: 'get',
    params: query
  })
}

// 获取团队请假记录
export function leaveListLog(query) {
  return request({
    url: '/system/leave/list',
    method: 'get',
    params: query
  })
}
